package com.zan.pattern.builder.demo1.before;

/**
 * @Author Zan
 * @Create 2024/4/25 16:13
 * @Description : 指挥者类
 * @ClassName: Director
 */
public class Director {

    // 声明builder类型的变量
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    // 组装自行车的功能
    public Bike construct() {
        builder.buildFrame();
        builder.buildSeat();
        return builder.createBike();
    }
}
